package com.xqb.modules.domain.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xqb.common.annotation.Excel;
import com.xqb.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单明细对象 ord_order_detail
 * 
 * @author xqb
 * @date 2024-10-14
 */
public class OrdOrderDetail extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 订单明细id */
    private Long id;

    /** 订单id */
    @Excel(name = "订单id")
    private Long orderId;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 课程id */
    @Excel(name = "课程id")
    private Long courseId;

    /** 课程价格 */
    @Excel(name = "课程价格")
    private BigDecimal price;

    /** 课程名称 */
    @Excel(name = "课程名称")
    private String name;

    /** 封面地址 */
    @Excel(name = "封面地址")
    private String coverUrl;

    /** 课程学习有效期，单位月。空则代表永久有效 */
    @Excel(name = "课程学习有效期，单位月。空则代表永久有效")
    private Long validDuration;

    /** 课程学习的过期时间，支付成功开始计时 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "课程学习的过期时间，支付成功开始计时", width = 30, dateFormat = "yyyy-MM-dd")
    private Date courseExpireTime;

    /** 折扣金额 */
    @Excel(name = "折扣金额")
    private BigDecimal discountAmount;

    /** 实付金额 */
    @Excel(name = "实付金额")
    private BigDecimal realPayAmount;

    /** 订单详情状态，1：待支付，2：已支付，3：已关闭，4：已完成，5：已报名 */
    @Excel(name = "订单详情状态，1：待支付，2：已支付，3：已关闭，4：已完成，5：已报名")
    private Integer status;

    /** 1：待审批，2：取消退款，3：同意退款，4：拒绝退款，5：退款成功，6：退款失败' */
    @Excel(name = "1：待审批，2：取消退款，3：同意退款，4：拒绝退款，5：退款成功，6：退款失败'")
    private Integer refundStatus;

    /** 优惠券id */
    @Excel(name = "优惠券id")
    private Long couponId;

    /** 支付渠道名称 */
    @Excel(name = "支付渠道名称")
    private String payChannel;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId()
    {
        return orderId;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setCourseId(Long courseId)
    {
        this.courseId = courseId;
    }

    public Long getCourseId()
    {
        return courseId;
    }
    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }
    public void setName(String name)
    {
        this.name = name;
    }

    public String getName()
    {
        return name;
    }
    public void setCoverUrl(String coverUrl)
    {
        this.coverUrl = coverUrl;
    }

    public String getCoverUrl()
    {
        return coverUrl;
    }
    public void setValidDuration(Long validDuration)
    {
        this.validDuration = validDuration;
    }

    public Long getValidDuration()
    {
        return validDuration;
    }
    public void setCourseExpireTime(Date courseExpireTime)
    {
        this.courseExpireTime = courseExpireTime;
    }

    public Date getCourseExpireTime()
    {
        return courseExpireTime;
    }
    public void setDiscountAmount(BigDecimal discountAmount)
    {
        this.discountAmount = discountAmount;
    }

    public BigDecimal getDiscountAmount()
    {
        return discountAmount;
    }
    public void setRealPayAmount(BigDecimal realPayAmount)
    {
        this.realPayAmount = realPayAmount;
    }

    public BigDecimal getRealPayAmount()
    {
        return realPayAmount;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setRefundStatus(Integer refundStatus)
    {
        this.refundStatus = refundStatus;
    }

    public Integer getRefundStatus()
    {
        return refundStatus;
    }
    public void setCouponId(Long couponId)
    {
        this.couponId = couponId;
    }

    public Long getCouponId()
    {
        return couponId;
    }
    public void setPayChannel(String payChannel)
    {
        this.payChannel = payChannel;
    }

    public String getPayChannel()
    {
        return payChannel;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("orderId", getOrderId())
            .append("userId", getUserId())
            .append("courseId", getCourseId())
            .append("price", getPrice())
            .append("name", getName())
            .append("coverUrl", getCoverUrl())
            .append("validDuration", getValidDuration())
            .append("courseExpireTime", getCourseExpireTime())
            .append("discountAmount", getDiscountAmount())
            .append("realPayAmount", getRealPayAmount())
            .append("status", getStatus())
            .append("refundStatus", getRefundStatus())
            .append("couponId", getCouponId())
            .append("payChannel", getPayChannel())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .toString();
    }
}
